package com.yisen.dasan.service;

import com.github.pagehelper.PageInfo;
import com.yisen.dasan.entity.FormResponse;
import com.yisen.dasan.pojo.Form;
import com.yisen.dasan.pojo.User;

import javax.mail.MessagingException;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @AuthorList: LiuYiSen
 * @Date: 2020/10/3 14:21
 */
public interface UserService {
    /**
     * 该方法用来验证登陆用户用户名和密码
     * @param username
     * @param password
     * @return
     */
    String login(String username, String password);

    /**
     * 用户注册操作
     * @param username
     * @param password
     * @param mail
     * @return
     * @throws MessagingException
     */
    boolean register(String username,String password, String mail) throws MessagingException;

    /**
     * 用户激活操作
     * @param key
     * @return
     */
    boolean affirm(String key);

    /**
     * 返回该用户创建的所有表单
     * @param request
     * @return
     */
    PageInfo<FormResponse> selForm(int pageNum, HttpServletRequest request);
}
